import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:finance_app/src/widgets/form/form_edit_status_inherited_widget.dart';
import 'package:flutter/material.dart';

class PriceForm extends StatelessWidget {
  final String title;
  final String amount;
  final bool isHighlight;
  final Color textColor;

  const PriceForm({
    Key key,
    this.title,
    this.amount,
    this.isHighlight,
    this.textColor,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final textStyle = isHighlight == true
        ? FormEditStatusInheritedWidget.ofStyle(context)
        : TextStyle(
            color: textColor ?? aceDarkGrayColor,
            fontSize: getSp(18),
            fontWeight: FontWeight.w700,
            height: 14 / 16,
          );
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Text(
          title,
          style: textStyle,
        ),
        Text(
          amount,
          style: textStyle.copyWith(
            fontSize: getDp(24),
          ),
        ),
      ],
    );
  }
}
